package com.lnking.lnkingplace.model.dto.record.sewage;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class SewageListDto {

    private String id;

    private String placeName;

    private String placeId;

    @ApiModelProperty(value = "巡查时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkTime;

    @ApiModelProperty(value = "投放剂量")
    private String dosage;

    @ApiModelProperty(value = "余氯监测")
    private String residualChlorine;

    @ApiModelProperty(value = "机器运行情况")
    private String machine;

    @ApiModelProperty(value = "巡检人员")
    private String checkPersonnel;

    @ApiModelProperty(value = "备注")
    private String note;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "图片")
    private String photos;

    @JsonIgnore
    private String strResidualChlorine;

    public String getStrResidualChlorine(){
        if(null != residualChlorine){
            return String.valueOf(residualChlorine);
        }
        return null;
    }
}
